<?php

defined('SYSPATH') or die('No direct access allowed.');

class Domain_Dao_Generic implements Domain_Dao_Interface_Generic {
    /**
     *
     * @var Model_Generic
     */
    private $_rep;

    protected function set_repositoty($rep){
        $this->_rep = $rep;
    }

    /**
     *
     * @param <type> $id
     */
    public function load($id){
        return $this->_rep->load($id);
    }


    /**
     *
     * @param <Integer> $offset
     * @param <Integer> $limit
     */
    public function load_all($is_count = false,$offset=null,$limit=null,$filter = null, $sort = null){
        return $this->_rep->load_all($offset, $limit, $filter, $sort, $is_count);
    }

    /**
     *
     * @param <Domain_Entities_Customer> $o_entity
     */
    public function insert($o_entity){
        return $this->_rep->insert_by($o_entity);
    }

    /**
     *
     * @param <Domain_Entities_Customer> $o_entity
     */
    public function update($o_entity){
        return $this->_rep->update_by($o_entity);
    }

    /**
     *
     * @param <type> $id
     */
    public function delete($id){
        return $this->_rep->delete_by($id);
    }
}

?>
